#ifndef OBJECT_H
#define OBJECT_H

#include <QGraphicsItem>
#include <QVector2D>


class Object : public QGraphicsItem
{
public:

    enum { default_object_type=-1 };

    Object();
    virtual ~Object(){}


    void control();
    virtual void step()=0;
    void paint(QPainter *painter, const QStyleOptionGraphicsItem *option,
               QWidget *widget);

    QRectF  boundingRect() const;
    void    setBoundingRect(QRectF);
    inline int id()const;
    inline int objectType()const;
    void setObjectType(int);

private:


    int m_id;                 // unikalne id kazdego obiektu na scenie
    int m_object_type;        // typ obiektu (health, ammo, ... )
    int generateNextId(){ static int id=0; return id++;} // zwraca pierwsze wolne id

protected:

    QRectF m_boundingRect;



};

#endif // OBJECT_H
